setwd("~/Dropbox/Shared Folders/Tom Clark - LDA+IRT/CodeForPaper/")	
#setwd('~/Dropbox/DocumentClassProject/CodeForPaper')
library(Matrix)	
source("LDA+IRTFunctions.R")
load("LDA+IRTPaperData.RData")

setburn <- 5000	
setmcmc <- 5000

for (setLDAtopics in c(2)){

	LDAIRT.out <- LDAIRT(WordSparseMatrix, VoteMatrix,LDA.topics= setLDAtopics, save.word.chain=FALSE, save.topic.chain=FALSE, save.ideal.chain=TRUE, save.discrim.chain=FALSE, burn.iter= setburn,mcmc.iter= setmcmc)
	currentfilename <- paste("OptimalTopicCountSearch/SavedLDAIRT-",setLDAtopics,"-",setburn,"-",setmcmc,".RData",sep="")
	save(LDAIRT.out,file=currentfilename)
	rm(LDAIRT.out)
	
} 